﻿@using CommandLib
@using FindArtInfo.Models
@using Resources
@model PageSignaturesLetterModel
@{
    ViewBag.Title = "Signatures and monograms. Find the artist. Auction price";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h1 class='underline'>@string.Format(Multi.PageSignaturesLetterTitle)</h1>
<h2>@Multi.PageSignaturesLetterMessage1</h2>
<center>
    @for (var i = 65; i <= 90; i++)
    {
        var letter = char.ConvertFromUtf32(i);
        if (letter == Model.Letter)
        {         
            <span>@(letter)&nbsp;</span>
        }
        else
        { 
            <span>
                <a href="~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/@letter/browse-signatures.html" title="@string.Format(Multi.PageSignaturesLetterMessage2, letter)">@letter</a>&nbsp;
            </span>
        }
    }                  
    @if (char.ConvertFromUtf32(198) == Model.Letter)
    {
        <span>@(char.ConvertFromUtf32(198))&nbsp;</span>
    }  
    else
    {
        <span>            
            <a href="~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/@char.ConvertFromUtf32(198)/browse-signatures.html" title="@string.Format(Multi.PageSignaturesLetterMessage2, char.ConvertFromUtf32(198))">Ae</a>&nbsp;
        </span>
    }	 
    @if (char.ConvertFromUtf32(216) == Model.Letter)
    {
        <span>@(char.ConvertFromUtf32(216))&nbsp;</span>
    }  
    else
    {
        <span>
            <a href="~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/@char.ConvertFromUtf32(216)/browse-signatures.html" title="@string.Format(Multi.PageSignaturesLetterMessage2, char.ConvertFromUtf32(216))">Oe</a>&nbsp;
        </span>
    }
    @if (char.ConvertFromUtf32(197) == Model.Letter)
    {
        <span>@(char.ConvertFromUtf32(197))&nbsp;</span>
    }  
    else
    {
        <span>
            <a href="~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/@char.ConvertFromUtf32(197)/browse-signatures.html" title="@string.Format(Multi.PageSignaturesLetterMessage2, char.ConvertFromUtf32(197))">Aa</a>&nbsp;
        </span>
    }      
</center>
<p align='right'><b>@string.Format(Multi.PageSignaturesLetterPaging, Model.PageIndex, Model.TotalPage)</b></p>
<table border='0' width='100%' cellspacing='0' cellpadding='0'>
    <tr>
        <td width='50%' align='left' valign='top'>
            <table border='0' width='100%' cellspacing='0' cellpadding='0'>
                <tr>
                    <td align='left' valign='top' style='line-height:20px;'>
                        @for(var i = 0; i < 30; i++)
                        {
                            if (i >= Model.ListArtists.Count) {break;}
                            if (Model.ListArtists[i].CountryName == "United States of America")
                            {
                                Model.ListArtists[i].CountryName = "USA";
                            }                                                
                            <span class='linkgoogle'>
                                <a title='@string.Format(Multi.PageSignaturesLetterMessage3, Model.ListArtists[i].LastName +", "+ Model.ListArtists[i].FirstName +" "+ Model.ListArtists[i].MiddleName)' 
                                    href='~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/list-signatures-by-artist/@Model.ListArtists[i].ArtistId/@(Utils.UnicodeToKoDauAndGach(Model.ListArtists[i].FirstName)).html'>
                                          • @HttpUtility.HtmlDecode(Model.ListArtists[i].LastName + ", " + Model.ListArtists[i].FirstName + " " + Model.ListArtists[i].MiddleName)
                                        @(Model.ListArtists[i].CountryName.ToLower() != "country unknown" ? "(" + Model.ListArtists[i].CountryName + ")" : string.Empty)
                                        @(Model.ListArtists[i].Born > 0 ? "(" + Model.ListArtists[i].Born + "-" + (Model.ListArtists[i].Died > 0 ? Model.ListArtists[i].Died.ToString() : string.Empty) + ")" : string.Empty)
                                </a>
                            </span><br/>                    												
                        }           
				    </td>
                </tr>
            </table>
        </td>
        <td width='50%' align='left' valign='top'>
            <table border='0' width='100%' cellspacing='0' cellpadding='0'>
                <tr>
                    <td align='left' valign='top' style='line-height:20px;'>
				        @for(var i = 30; i < 60; i++)
                        {
                            if (i >= Model.ListArtists.Count) {break;}
                            if (Model.ListArtists[i].CountryName == "United States of America")
                            {
                                Model.ListArtists[i].CountryName = "USA";
                            }                                                
                            <span class='linkgoogle'>
                                <a title='@string.Format(Multi.PageSignaturesLetterMessage3, Model.ListArtists[i].LastName +", "+ Model.ListArtists[i].FirstName +" "+ Model.ListArtists[i].MiddleName)' 
                                    href='~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/list-signatures-by-artist/@Model.ListArtists[i].ArtistId/@(Utils.UnicodeToKoDauAndGach(Model.ListArtists[i].FirstName)).html'>
                                          • @HttpUtility.HtmlDecode(Model.ListArtists[i].LastName + ", " + Model.ListArtists[i].FirstName + " " + Model.ListArtists[i].MiddleName)
                                        @(Model.ListArtists[i].CountryName.ToLower() != "country unknown" ? "(" + Model.ListArtists[i].CountryName + ")" : string.Empty)
                                        @(Model.ListArtists[i].Born > 0 ? "(" + Model.ListArtists[i].Born + "-" + (Model.ListArtists[i].Died > 0 ? Model.ListArtists[i].Died.ToString() : string.Empty) + ")" : string.Empty)
                                </a>
                            </span><br/>                    												
                        }
				    </td>
                </tr>
            </table>
        </td>
    </tr>    
    <tr>
        <td colspan="2">
            <center>   
                <p align='center'><b>@Multi.PageSignaturesLetterGotoPage<br/></b></p>             
                @Html.Partial("_PartialPagingReWrite", new PartialPagingModel { PageIndex = Model.PageIndex, PageSize = Model.PageSize, TotalPage = Model.TotalPage, TotalRecord = Model.TotalRecord, Url = Model.Url })
            </center>
        </td>
    </tr>
</table>
